package caidan.net;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Suggest
{
	static final SimpleDateFormat formatter = new SimpleDateFormat("M.dd");
	private int id = -1;
	private String user;
	private String content;
	private String dateString;
	// private Date date;
	public Suggest()
	{
	}
	public Suggest(String user, String content, Date date)
	{
		this.user = user;
		this.content = content;
		// this.date = date;
		dateString = formatter.format(date);
	}

	public Suggest(String user, String content, String dateString)
	{
		this.user = user;
		this.content = content;
		this.dateString = dateString;
	}

	public int getId()
	{
		return id;
	}
	public void setId(int id)
	{
		this.id = id;
	}
	public boolean isLocale()
	{
		return id == -1;
	}
	public String getUser()
	{
		return user;
	}
	public void setUser(String user)
	{
		this.user = user;
	}
	public String getContent()
	{
		return content;
	}
	public void setContent(String content)
	{
		this.content = content;
	}
	public String getDateString()
	{
		return dateString;
	}
	public void setDate(Date date)
	{
		// this.date = date;
		dateString = formatter.format(date);
	}
	public String getTitle()
	{
		return user + "(" + dateString + ")";
	}
}
